In an example scenario, debugging a microcontroller system may involve determining the optimum frequency at which to run the microcontroller system. If the frequency is too low, the microcontroller system will not have time to execute internal tasks and system errors may occur (e.g., under-run error). If the frequency is too high, the current consumption increases significantly which may limit the battery life for portable devices.